package com.example.project1.adapter;

import java.util.List;

import com.example.project1.R;
import com.example.project1.adapter.YonghuAdapter.ViewHolder;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

public class WuLiaoAdapter extends BaseAdapter{
private Context context;
private List<String> data;
	public WuLiaoAdapter(Context context, List data) {
		super(context, data);
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {

		ViewHolder holder;
		if(convertView==null){
			convertView=getInflater().inflate(R.layout.item_spinner, null);
			holder=new ViewHolder();
			holder.tv=(TextView) convertView.findViewById(R.id.textView1);
			convertView.setTag(holder);
		}else{
			holder=(ViewHolder) convertView.getTag();
		}
		
			holder.tv.setText(getData().get(position).toString());
		
		return convertView;
	}
	class ViewHolder{
		private TextView tv;
	}


}
